import * as React from 'react';
import * as ReactDOM from 'react-dom';

import { Provider } from 'react-redux';
import { LocaleProvider } from 'antd';
import zhCN from 'antd/lib/locale-provider/zh_CN';

import store from './store';
import App from 'containers/app';

class Index extends React.Component<{}, {}> {
  public render(): JSX.Element {
    return (
      <LocaleProvider locale={zhCN}>
        <Provider store={store}>
          <App />
        </Provider>
      </LocaleProvider>
    );
  }
}

ReactDOM.render(<Index />, document.getElementById('index'));

if ((module as any).hot) {
  (module as any).hot.accept();
}
